<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/react.development.js"></script>
    <script src="./lib/react-dom.development.js"></script>
    <script src="./lib/babel.min.js"></script>
</head>

<body>
    <div id="root"></div>
</body>
<script type="text/babel">
    const root = ReactDOM.createRoot(document.querySelector("#root"));
    // root.render((
    //     <div></div>
    // ))

    const span = <span>我是span</span>  //createElement(span,null, 我是span)
    console.log(span); // span是jsx创建出来的react元素，跟createElement创建的一样

    root.render(span);

    // 创建复杂结构
    const div = (
        <div className='box'>
            <h3>我是标题</h3>
            <p className='c1'>我是内容</p>
        </div>
    )

    root.render(div);

</script>

</html>